[LINUX] dma: Use swiotlb mask for coherent mappings too
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 20 Dec 2006 11:21:04 +0000 (11:21 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 20 Dec 2006 11:21:04 +0000 (11:21 +0000)
commit576a882bc5c9c70cfa2374b89db35ccd73300547
treea3b7bd831b93fe2d717c2fa38ee7c73970e6ee47
parent3d17485a079b15c0079b9dfdf3013ec617291543
[LINUX] dma: Use swiotlb mask for coherent mappings too

The recent change to use a default DMA bit width of 30 bits (required
by chips like the b44) only converted the streaming DMA primitives.
The coherent mappings are still hard-coded to 31 bits.  This means
that b44 still doesn't work under Xen.

This patch makes the io_tlb_dma_bits variable global and uses it for
coherent memory mappings.

Thanks to Calvin Webster for providing a machine with a b44 and 2G
of memory I've been able to verify that this finally makes the b44
work under Xen.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Rename 'io_tlb_dma_bits' to the more correct 'dma_bits'. This also
affects the name of the boot parameter, which is now 'dma_bits='.

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/swiotlb.h